<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>


<c:if
	test="${empty messageList && not write && empty param.message && empty sentMessagesList}">
	<div class="NoMessage">
		<p>I'm sorry :( No messages here for you</p>
	</div>
</c:if>
<div class="inbox">

	<c:forEach var="message" items="${messageList}">


		<ul>

			<li><t:messageHeader message="${message}" /></li>

			<li><details>
					<summary
						onclick="setRead(${message['id']}, ${message['read']}, 'unread${message['id']}')">Show
						message</summary>
					<textarea readonly="readonly" rows="10">${message['text']}</textarea>
					<br />
					<a href="./write?id=${message['id']}">reply</a>
				</details></li>

		</ul>

	</c:forEach>
</div>



